 

<div style='display:none;'>
{foreach from=$checkPaymentErrors key=error item=value}
	{if $error == 'NOT_OWNER'}
		<p class="error">[[You're not the owner of this payment]]</p>
	{elseif $error == 'NOT_LOGGED_IN'}
		<p class="error">[[Please log in to place a listing. If you do not have an account, please]] <a href="{$GLOBALS.site_url}">[[Register]]</a></p>
		<br/><br/>
		{module name="users" function="login"}
	{/if}
{foreachelse}
	<br />
	[[Dear customer!]]<br /><br />

	{capture name=product_info_price}
		[[$product_info.price]]
	{/capture}
	{assign var="product_info_price" value=$smarty.capture.product_info_price}
	{assign var="product_info_subscription_period" value=$product_info.subscription_period}
	{assign var="currency_sign" value=$GLOBALS.settings.transaction_currency}
	{if $type == 'product'}
		[[Please make a payment in the amount of $currency_sign $product_info_price for product(s)]]:
		{foreach name="product_names_loop" item="productName" from=$productsNames}
			<strong>[[{$productName}]]</strong>{if !$smarty.foreach.product_names_loop.last}, {/if}
		{/foreach}
	{elseif $type == 'listing'}
		[[Payment for listing ID]] {$objectSID}
	{elseif $type == 'listings'}
		[[Payment for listings #]] {$objectSID}
	{elseif $type == 'featured_listing'}
		[[Payment for upgrade listing ID]] {$objectSID} [[to featured]]
	{elseif $type == 'priority_listing'}
		[[Payment for upgrade listing ID]] {$objectSID} [[to priority]]
	{/if}

	{if $errors}
	[[The following errors occured:]]<br />
		{foreach from=$errors key=error item=error_data}
			{if $error == 'NOT_IMPLEMENTED'}<p class="error">[[There is something missing in the code]]</p>{/if}
			{if $error == 'PRODUCT_PRICE_IS_NOT_SET'}<p class="error">[[No price is defined for this payment]]</p>{/if}
			{if $error == 'PRODUCT_NAME_IS_NOT_SET'}<p class="error">[[Product name is not defined]]</p>{/if}
		{/foreach}
	{/if}
	<p>[[Please choose from the following payment methods:]]</p>

	{foreach from=$gateways item=gateway}
		<form action="{$gateway.url}" method="post">
			{$gateway.hidden_fields}
			<br/><input type='submit' value='{$gateway.caption}' class="paymentButton" />
		</form>
	{/foreach}
{/foreach}
</div>

<form method='post' action=" ">
 
<div class='divpay'>

{foreach from=$productsNames item=pro}
<b><h3><font style='color:red'>{$pro}</font></h3></b>
{/foreach}

<b><h3  style='color:red;font-size: 18px;'>Total Price: ${$totalprice}</h3></b>

<input type='text' name='totalprice' value='{$totalprice}' style='display:none;' >
<input type='text' name='paymentid' value='{$paymentid}' style='display:none;' >

<input type="radio" checked='checked' name="pay" value="1" />Credit Card
{if $GLOBALS.current_user.group.id != "JobSeeker"}
<input type="radio"  name="pay" value="2" />Invoice
{/if}

<h3>Billing Information</h3>
<font>Billing information must match the credit card information.</font><br><br>
<span>Name:</span><input name='username' type='text' value='{$user->details->properties.ContactName->value}' style='width:150px' /><br>
<span>Street Address:</span><input name='address' type='text' value='{$user->details->properties.Address->value}' style='width:300px'/><br>
<span>City:</span><input name='city' type='text' value='{$user->details->properties.City->value}' style='width:150px'/><br>
<span>State:</span><input name='state' type='text' value='{$state}' style='width:150px'/><br>
<span>Zip:</span><input name='zip' type='text' value='{$user->details->properties.ZipCode->value}' style='width:80px'/><br>

<div id='div_credit' style='height:200px'>
<div style='float:left;width:300px;'>
<h3>Credit Card Information</h3>
<span>Credit Card Number:</span><input name='creditnumber' type='text' value='' style='width:150px'/><br>
<span>Expiration Date:</span>
<select name="Card_Exp_Month">
  <option value="01"> 01 </option>
  <option value="02"> 02 </option>
  <option value="03"> 03 </option>
  <option value="04"> 04 </option>
  <option value="05"> 05 </option>
  <option value="06"> 06 </option>
  <option value="07"> 07 </option>
  <option value="08"> 08 </option>
  <option value="09"> 09 </option>
  <option value="10"> 10 </option>
  <option value="11"> 11 </option>
  <option value="12"> 12 </option>
</select>
<select name="Card_Exp_Year">
  <option value="2012">
  2012                                    </option><option value="2013">
  2013                                    </option><option value="2014">
  2014                                    </option><option value="2015">
  2015                                    </option><option value="2016">
  2016                                    </option><option value="2017">
  2017                                    </option><option value="2018">
  2018                                    </option><option value="2019">
  2019                                    </option><option value="2020">
  2020                                    </option><option value="2021">
  2021                                    </option>
</select>

<br>
<span>CVV2:</span><input name='creditcvv' type='text' value='' style='width:50px'/><br>
<span>Cardholder's Name:</span><input name='creditname' type='text' value='' style='width:150px'/><br>
<span>Issuer of card:</span>
<select name="Card_Issuer">
<option value="Visa">Visa</option>
<option value="MC">Master Card</option>
<option value="Disc">Discover</option>
<option value="AmEx">American Express</option>                
</select>
</div>

<div style="width:300px; float:left; text-align:center;">
	<iframe scrolling="no" frameborder="0" allowtransparency="true" style="border:none; overflow:hidden; width:0px; height:21px;" src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Fmotorcycleindustryjobs&amp;send=false&amp;layout=button_count&amp;width=80&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font=segoe+ui&amp;height=21&amp;appId=180499568670514"></iframe>
	<br><br><br><br>
    <span id="siteseal">
    <img width="132" height="90" src="/templates/_system/main/images/cc.jpg">
     
	<br><br>
	<script src="https://seal.starfieldtech.com/getSeal?sealID=Gl69B4f0TJAIyP5HtPAA28dL17Orlql3biDmhjWvPt2yS9IjmzIA6dLIC5" type="text/javascript"></script>
</div>

</div>

<div style="clear:both;"></div>

<div id='div_invoice' style='text-align:left;clear:left;'>
<h3>Invoice Infomation</h3>
<span>Purchase Order Number: </span>
<input name="invoicenumber" type='text' style='width:150px'/><span style='color:red;font-size:20px;text-align:left;display:none;'>*</span>
</div>

<div style="clear:both;"></div>



</div>  


</div>

<p style='text-align:left; display:block;'>
<input type='submit' value='Proceed' name='btnsub'>
</p>
</form>

{literal}
<script>
  
$('input[name=pay]').live('click',function(){
	if($(this).val()==1)
	{
		$('#div_invoice').hide();
		$('#div_credit').show();
	}
	else{
		$('#div_credit').hide();
		$('#div_invoice').show();
	}
}); 

$('#div_credit').show();
$('#div_invoice').hide();


$("span[class=m_des]").live("click",function(){
	var id = $(this).attr('id');
	$("#"+id+"_des").toggle("slow");
});

$('div[class=div_tog]').toggle();

$('input[name=btnsub]').live("click",function(){ 
    if($('input[name=pay]:checked').val()=='2')
    {
        if($('input[name=invoicenumber]').val()=="")
        {
            //alert('please enter order number.');
            //return false;
        }
    }
});

</script>
{/literal}

{literal}
<style> 
.divpay{text-align:left;}
.divpay span{text-align:right;width:140px;display:inline-block;}
</style>






 {/literal}<div>
